home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / bash-1.12 / dist / quit.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-07  |  425 b   |  15 lines

  1. /* quit.h -- How to handle SIGINT gracefully. */
  2.  
  3. #ifndef __QUIT__
  4. #define __QUIT__
  5. /* Non-zero means SIGINT has already ocurred. */
  6. extern int interrupt_state;
  7. extern void throw_to_top_level ();
  8.  
  9. /* Macro to call a great deal.  SIGINT just sets above variable.  When
  10.    it is safe, put QUIT in the code, and the "interrupt" will take place. */
  11. #define QUIT if (interrupt_state) throw_to_top_level ()
  12.  
  13. #endif /* __QUIT__ */
  14.  
  15.